package com.example.service;

import javax.servlet.http.HttpServletResponse;

/**
 * @author lbq
 * @version 1.0
 * @date 2021/3/28 22:55
 */
public interface UserService {

    /**
     * 注册接口
     *
     * @param email    邮箱地址
     * @param password 密码
     * @param code     验证码
     * @param response
     * @return
     */
    String register(String email, String password, String code, HttpServletResponse response) throws Exception;

    /**
     * 根据邮箱地址判断是否已注册
     *
     * @param email 邮箱地址
     * @return
     */
    String isRegister(String email);

    /**
     * 登录接口
     *
     * @param email    邮箱地址
     * @param password 密码
     * @param response
     * @return
     */
    String login(String email, String password, HttpServletResponse response) throws Exception;

    /**
     * 根据token查询用户登录邮箱
     *
     * @param token token
     * @return
     */
    String info(String token);
}
